<?php
//开发配置文件

return array(
    'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
    'name'=>'Payview',

    // autoloading model and component classes
    'import'=>array(
        'application.models.*',
        'application.components.*',
        'application.models.forms.*',

        'application.helper.*',
    ),

    'modules'=>array(
        // uncomment the following to enable the Gii tool

    ),

    // application components
    'components'=>array(
        'user'=>array(
            // enable cookie-based authentication
            'allowAutoLogin'=>true,
            'loginUrl'=>array('user/login'),
            'class' => 'WebUser'
        ),

        'urlManager'=>array(
            'urlFormat'=>'path',
            'showScriptName'=>false,
            'caseSensitive'=>false,
            'rules'=>array(
                '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
                '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
            ),
        ),

        'db'=>array(
            'connectionString' => 'mysql:host=127.0.0.1;dbname=payview',//172.16.13.142
            'emulatePrepare' => true,
            'username' => 'root',
            'password' => '',
            'charset' => 'utf8',
        ),

        'redis' => array(
            "class" => "ext.redis.ARedisConnection",
            "hostname" => "127.0.0.1",
            "port" => 6379,
            "database" => 1,
            "password" => 'huikewk',
            "prefix" => "Payview.redis:"
        ),
        /********************************************************************/


        'WxInterface' => array(
            'class' => 'application.components.WxInterface',
        ),

        'errorHandler'=>array(
            // use 'site/error' action to display errors
            'errorAction'=>'site/error',
        ),
        'log'=>array(
            'class'=>'CLogRouter',
            'routes'=>array(
                array(
                    'class' => 'CFileLogRoute',
                    'levels' => 'error, warning',
                ),
                array(
                    'class' => 'CFileLogRoute',
                    'levels' => 'error, warning, info',
                    'categories'=> 'orders.*',
                    'logFile'=> 'orders.log',
                ),
            ),
        ),
    ),

    // using Yii::app()->params['paramName']
    'params' => array(
        'FRONTEND_BASEURL' => 'http://pv.visastandards.com/',

        'allpay' => array(
            'api_url' => 'https://pay.visastandards.com:9902/gclients',
            'token' => '30d6eba54ea9965cb5079a6181e56fcc',
            'notify_url' => 'http://pvtest.visastandards.com/pay/wxcallback',
        ),

        'QR_BASEURL' => 'http://pv.visastandards.com/merchants_mpqrcode/',

        'get_qrcode'=>'http://y.visastandards.com/qrcode/get',
        'get_isdiscount'=>'http://y.visastandards.com/qrcode/getIsDiscount',
        'message'=>'http://pvtest.visastandards.com/merchant/message',
        'rqcode_src'=>'/resources/frontend/images/yinzu.png'
    ),
);
